package com.zimmur.app.mocolink.domain.param;

import java.util.Date;

import com.zimmur.app.mocolink.domain.util.DateUtils;
import com.zimmur.app.mocolink.domain.util.StringUtils;

public class OrderParamForManage {
	private Integer pageNo;
	private Integer pageSize=10;
	private String status;
	private String keyword;
	private String startTime;
	private String endTime;
	private Integer goodsNumMin;
	private Integer goodsNumMax;
	private Integer payJeMin;
	private Integer payJeMax;
	
	private Date startDate;
	private Date endDate;
	private Integer pageBeginNo;

	
	public OrderParamForManage(Integer pageNo){
		this.pageNo=pageNo;
		this.pageBeginNo=(pageNo-1)*pageSize;
	}
	public OrderParamForManage(Integer pageNo,String status,String keyword,String startTime,String endTime,
			Integer goodsNumMin,Integer goodsNumMax,Integer payJeMin,Integer payJeMax){
		this.pageNo=pageNo;
		this.pageBeginNo=(pageNo-1)*pageSize;
		if(!StringUtils.isBlank(status)){
			this.status = status.trim();
		}
		if(!StringUtils.isBlank(keyword)){
			this.keyword = keyword.trim();
		}
		if(!StringUtils.isBlank(startTime)){
			this.startTime = startTime;
			this.startDate = DateUtils.dateFormat(startTime+ " 00:00:00");
		}
		if(!StringUtils.isBlank(endTime)){
			this.endTime = endTime;
			this.endDate=DateUtils.dateFormat(endTime+" 23:59:59");
		}
		if(goodsNumMin>0){
			this.goodsNumMin=goodsNumMin;
		}
		if(goodsNumMax>0){
			this.goodsNumMax=goodsNumMax;
		}
		if(payJeMin>0){
			this.payJeMin=payJeMin;
		}
		if(payJeMax>0){
			this.payJeMax=payJeMax;
		}
	}
	
	public Integer getPageNo() {
		return pageNo;
	}
	public void setPageNo(Integer pageNo) {
		this.pageNo = pageNo;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getKeyword() {
		return keyword;
	}
	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	public String getStartTime() {
		return startTime;
	}
	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	public String getEndTime() {
		return endTime;
	}
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	public Integer getGoodsNumMin() {
		return goodsNumMin;
	}
	public void setGoodsNumMin(Integer goodsNumMin) {
		this.goodsNumMin = goodsNumMin;
	}
	public Integer getGoodsNumMax() {
		return goodsNumMax;
	}
	public void setGoodsNumMax(Integer goodsNumMax) {
		this.goodsNumMax = goodsNumMax;
	}
	public Integer getPayJeMin() {
		return payJeMin;
	}
	public void setPayJeMin(Integer payJeMin) {
		this.payJeMin = payJeMin;
	}
	public Integer getPayJeMax() {
		return payJeMax;
	}
	public void setPayJeMax(Integer payJeMax) {
		this.payJeMax = payJeMax;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public Integer getPageBeginNo() {
		
		return pageBeginNo;
	}
	public void setPageBeginNo(Integer pageBeginNo) {
		this.pageBeginNo = pageBeginNo;
	}
	
}
